package com.anxin.act.listener;

import org.activiti.engine.delegate.DelegateExecution;
import org.springframework.context.annotation.Configuration;

/**
 * 流程变量监听器
 */
@Configuration
public class ProcessVarListener  {

    /**
     * 设置变量
     * @param execution
     * @param key
     * @param value
     */
    public void setValue(DelegateExecution execution,String key,String value){
        execution.setVariable(key,value);
    }


    /**
     * 获取变量变量
     * @param execution
     * @param key
     */
    public Object getValue(DelegateExecution execution,String key){
        return execution.getVariable(key);
    }

}
